/**********************************************************************************
**
** Copyright (C) 2009 Jostein Bratlie
** Contact: jostein.bratlie@gmail.com | http://bratlie.info | http://episteme.hin.no
**
** This file is part of GMQtExt, a GMlib and Qt extension library
**
** GMQtExt is free software: you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** GMQtExt is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with GMQtExt.  If not, see <http://www.gnu.org/licenses/>.
**
**********************************************************************************/

#ifndef SCENEMODEL_H
#define SCENEMODEL_H



// Qt
#include <QStandardItemModel>


// GMlib
namespace GMlib {

  class Scene;
  class SceneObject;
}


namespace GMQtExt {

  class SceneItem;

  class SceneModel : public QStandardItemModel {
  public:
    SceneModel( const QString& name = QString() );

    int             getNoCameras();
    int             getNoLights();
    int             getNoObjects();

    void            set( GMlib::Scene* scene );

  protected:
    int             _no_objects;
    int             _no_cameras;
    int             _no_lights;
    SceneItem       *_root;

    virtual void    populate( GMlib::Scene* scene );
    virtual void    populate( GMlib::SceneObject *parent_obj, SceneItem* parent_item );


  }; // END class SceneModel




} // END namespace GMQtExt

#endif // SCENEMODEL_H
